|
B.A.R.G.A.M.E.
v2.0
El Farol Bar Problem Implementation
|
Public Member Functions | |
| Bar () | |
| Default Bar Constructor. | |
| Bar (int cap) | |
| Bar Constructor. | |
| int | getBarCapacity () |
| returns a bars "Maxcapacity" | |
| double | wonThisTurn (int peeps) |
| Bar Class. | |
Bar Class.
This is the Bar class which contains the Bar object constructor which creates one instance of a bar characteristized by its unqiue maxcapacity "maxcapacity" to be available to the simulated population to choice as well as two additional functions: getBarCapacity() wonThisTurn(int peeps) which are used within the Town class. Detailed descriptions of the functions given below.
| Bar::Bar | ( | int | cap | ) |
Bar Constructor.
Description: Bar Constructor which initializes a bars only attribute, its capacity to the sepecifed value. This is extracted from the what the user inputs into the GUI.
| cap | The value to which the Bars Object attribute "Maxcapacity" is defined as. |
| int Bar::getBarCapacity | ( | ) |
returns a bars "Maxcapacity"
Description: Returns an integer which represents a bars "Maxcapacity".
| double Bar::wonThisTurn | ( | int | peeps | ) |
Bar Class.
Description: Using division, we divide the number of people going to this bar by the bars attribute "Maxcapacity" in order return a number that shows what the bars capacity ratio is for a specific round.
| peeps | The number of Agents who have decided to visit the given Bar Object. |
1.8.0